package cn.openea.perpartner.expert.web.controller;

import cn.openea.perpartner.common.core.web.controller.BaseController;
import cn.openea.perpartner.common.core.web.domain.AjaxResult;
import cn.openea.perpartner.common.core.web.page.TableDataInfo;
import cn.openea.perpartner.expert.web.domain.dto.SignupDto;
import cn.openea.perpartner.expert.web.domain.entity.Signup;
import cn.openea.perpartner.expert.web.service.ISignupService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
/**
 * @author Weird077
 * @description TODO
 * @date 2023-06-26 15:30
 */
@RestController
@RequestMapping("/expert/signup")
public class SignupController extends BaseController {
    @Resource
    private ISignupService signupService;

    @PostMapping("/list")
    public TableDataInfo selectSignupList(@RequestBody SignupDto dto) {
        startPage();
        List<Signup> list = signupService.selectSignupList(dto);
        return getDataTable(list);
    }
    @PostMapping("/detail")
    public AjaxResult selectSignupInfo(@RequestBody SignupDto dto) {
        return success(signupService.selectSignupInfo(dto));
    }
}
